home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HyperLib 1997 Winter - Disc 1
/
HYPERLIB-1997-Winter-CD1.ISO.7z
/
HYPERLIB-1997-Winter-CD1.ISO
/
オンラインウェア
/
BUS
/
TMCM Software and Labs.sit
/
Software for TMCM 7_95
/
Files for Lab 9
/
necklace
< prev
next >
Wrap
Text File
|
1993-10-17
|
1KB
|
25 lines
{ This little program draws a circle of radius 5 with
little circles of radius 1/2 lying outside it and
tangent to it. The big circle is drawn as a sequence
of eighteen 20-degree arcs, and one little circle is drawn
at the end of each arc. }
LOOP
arc(5,20) { draws a twenty degree arc along a circle of radius five;
the arc starts at the current turtle position and curves
counterclockwise (i.e. to the left of the turtle)--changing
the radius to -5 would make it turn to the right; the
turtle moves to the endpoint of the arc. }
circle(-0.5) { circle of raduis 1/2; the minus sign means that the
cicle will be drawn to the RIGHT of the turtle; the
turtle will end up in the same position as when it starts }
EXIT IF heading = 0 { terminates the loop if the heading of the turtle
is zero, that is, if the turtle is facing directly
to the right, as it does when the program starts. }
END LOOP